using MediatR;
using TerritoryGame.Domain.ValueObjects;

namespace TerritoryGame.Application.Queries;

public record GetRoomQuery : IRequest<GetRoomResult>
{
    public Guid RoomId { get; init; }
}

public record GetRoomResult
{
    public Guid RoomId { get; init; }
    public string Name { get; init; } = string.Empty;
    public string Status { get; init; } = string.Empty;
    public int MaxPlayers { get; init; }
    public int CurrentPlayers { get; init; }
    public int GameDuration { get; init; }
    public int? RemainingTime { get; init; }
    public Guid? CreatedBy { get; init; } // 房间创建者ID
    public List<PlayerInfo> Players { get; init; } = new();
    public bool Success { get; init; }
    public string? ErrorMessage { get; init; }
}

public record PlayerInfo
{
    public Guid Id { get; init; }
    public string NickName { get; init; } = string.Empty;
    public PlayerColor Color { get; init; }
    public GameScore Score { get; init; }
    public bool IsOnline { get; init; }
}
